﻿using System;
using System.Reflection;
using System.Collections.Generic;

namespace UFrameWork
{
    /// <summary>
    /// 框架事件通知定义
    /// </summary>
    public class UEvent
    {
        /// <summary>
        /// 框架加载完成
        /// ()
        /// </summary>
        public const string INIT_FINISH = "uwork.init.finish";

        /// <summary>
        /// 日志记录
        /// (object obj,ULogLevel level,string tag)
        /// </summary>
        public const string LOG_WRITE = "uwork.log.write";

        /// <summary>
        /// 执行命令
        /// (UMethod method, object[] params)
        /// </summary>
        public const string CMD_DO_START = "uwork.cmd.do.start";

        /// <summary>
        /// 执行命令出错
        /// (MethodInfo method, object[] params,Exception e)
        /// </summary>
        public const string CMD_DO_ERROR = "uwork.cmd.do.error";

        /// <summary>
        /// 执行命令结束
        /// (UMethod method, object[] params,object return)
        /// </summary>
        public const string CMD_DO_END = "uwork.cmd.do.end";

        /// <summary>
        /// 网络连接成功
        /// (UNetClient client)
        /// </summary>
        public const string NET_CONNECT_SUCCESS = "uwork.net.connect.success";

        /// <summary>
        /// 网络连接失败
        /// (UNetClient client,string msg)
        /// </summary>
        public const string NET_CONNECT_FAIL = "uwork.net.connect.fail";

        /// <summary>
        /// 网络状态连接断开
        /// (UNetClient client,string msg)
        /// </summary>
        public const string NET_CONNECT_CUT = "uwork.net.connect.cut";

        /// <summary>
        /// 接收到网络数据
        /// (UNetClient client,byte[] bytes,int readSize)
        /// </summary>
        public const string NET_RECEIVE_DATA = "uwork.net.receive.data";

        /// <summary>
        /// 接收到网络消息
        /// (UClient client,string msg)
        /// </summary>
        public const string NET_RECEIVE_MSG = "uwork.net.receive.msg";

        /// <summary>
        /// 发送网络消息
        /// (UNetClient client,string msg)
        /// </summary>
        public const string NET_SEND_MSG = "uwork.net.send.msg";

        /// <summary>
        /// 消息分发
        /// (UNetClient client,string msg)
        /// </summary>
        public const string MSG_DISPATCH = "uwork.msg.dispatch";

        /// <summary>
        /// 消息分发错误
        /// (UNetClient client,string msg,Exception e)
        /// </summary>
        public const string MSG_DISPATCH_ERROR = "uwork.msg.dispatch.error";
    }
}